﻿using System;

namespace TypePlane
{
    public class Object
    {
        #region Fields

        int x;
        int y;
        string visualisation;
        ConsoleColor color;

        #endregion

        #region Constructors

        public Object() { }

        public Object(int x, int y, string visualisation, ConsoleColor color = ConsoleColor.White)
        {
            this.x = x;
            this.y = y;
            this.visualisation = visualisation;
            this.color = color;
        }

        #endregion

        #region Properties

        public int X
        {
            get { return this.x; }
            set { this.x = value; }
        }

        public int Y
        {
            get { return this.y; }
            set { this.y = value; }
        }

        public string Visualisation
        {
            get { return this.visualisation; }
            set { this.visualisation = value; }
        }

        public ConsoleColor Color
        {
            get { return this.color; }
            set { this.color = value; }
        }

        #endregion

        #region Public methods

        public void PrintStringToScreen()
        {
            Console.SetCursorPosition(this.x, this.y);
            Console.ForegroundColor = this.color;
            Console.Write(this.visualisation);
        }

        #endregion
    }
}
